package com.jinhongone.pattern.structure.flyweight;

public class Test {

    public static void main(String[] args) {
        AbstractBox i1 = BoxFactory.getInstance().getBox("I");
        i1.display("黑色");
        AbstractBox i2 = BoxFactory.getInstance().getBox("I");
        i2.display("白色");
        System.out.println("不同颜色的同一方块是否为同一对象，是否共享：" + (i1 == i2));
    }
}
